package com.game.states;

import java.util.Dictionary;

import com.game.performers.Actor;

public class SimulationState {
	protected int id;
	/**
	 * 
	 */
	protected Dictionary<Integer, SimulationState> transitions;
	
	public void addTransition(SimulationState tostate){
		this.transitions.put(tostate.getId(), tostate);
	}
	
	public Dictionary<Integer, SimulationState> getTransitions(){
		return transitions;
	}
	
	//转化
	public void transition(){
		
	}
	
	/**
	 * 判断 是否可以转变到状态 tostate
	 * @param tostate
	 * @return
	 */
	public boolean canTransition(SimulationState tostate){
		if(transitions.get(tostate.getId()) != null){
			return true;
		}
		return false;
	}
	
	public int getId(){
		return id;
	}
	
	/**
	 * 移除id为stateid的状态 转化
	 * @param stateid
	 */
	public void removeTransition(int stateid){
		transitions.remove(stateid);
	}
	
	
}
